package cn.push.android;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;

import cn.push.embed.config.BroadcastReceiverAction;
import cn.push.embed.core.utils.Logger;

public class PushReceiver extends BroadcastReceiver {
    @Override
    public void onReceive(Context context, Intent intent) {
        String action;
        action=intent.getAction();
        Logger.d("Receiver:"+action);
        if (action.equals(BroadcastReceiverAction.ACTION_NOTIFICATION_RECEIVED)){
            Logger.d("Receiver:"+intent.getAction());
            String messageBean;
            messageBean= intent.getStringExtra("MessageBean");
            Logger.d("Receiver messageBean:"+messageBean);
        }
        if (action.equals(BroadcastReceiverAction.ACTION_NOTIFICATION_OPENED)){
            Logger.d("Receiver:"+intent.getAction());
            String messageBean;
            messageBean=  intent.getStringExtra("MessageBean");
            Logger.d("Receiver messageBean:"+messageBean);
        }

    }
}
